package com.thrd.taiexhibition.adapter;

import android.content.Context;

import com.facebook.drawee.generic.RoundingParams;
import com.thrd.basicframework.bean.BaseRecyclerAdapter;
import com.thrd.taiexhibition.R;
import com.thrd.taiexhibition.bean.BeanThemeResource;
import com.thrd.taiexhibition.fresco.FrescoImage;
import com.thrd.taiexhibition.fresco.FrescoUtils;

import java.util.List;

/**
 * @author: ${唐杰}
 * @date: 2021/3/30
 */
public class ThemeIndustryHomeAdapter extends BaseRecyclerAdapter<BeanThemeResource> {

    public ThemeIndustryHomeAdapter(Context context, List<BeanThemeResource> data) {
        super(context, data);
    }

    @Override
    public void bindData(BaseViewHolder holder, BeanThemeResource beanThemeResource) {
        FrescoImage mFrescoImage = (FrescoImage) holder.getView(R.id.fi_image);
        FrescoUtils.getInstance().setPrefixProgressLoad(getContext(),mFrescoImage,beanThemeResource.getIeResourceImg(), RoundingParams.fromCornersRadius(4));
    }

    @Override
    public int getItemLayoutId() {
        return R.layout.item_theme_industry;
    }


}
